import React from 'react'
import { useParams, useMatch, useSearchParams, useLocation } from 'react-router-dom'

export default function Details() {
  /* state参数： */
  const { state: { id, title } } = useLocation()
  return (
    <div>
      <h3>展示详情</h3>
      <ul>
        <li>{id}</li>
        <li>{title}</li>
      </ul>
    </div>
  )
}
